package com.ybg.user.business.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseUserInfo {
    @ApiModelProperty("用户编号(自增主键)")
    @TableId(value = "user_id", type = IdType.AUTO)
    private Integer userId;

    @ApiModelProperty("用户账号(唯一)")
    @TableField(value = "user_name", updateStrategy = FieldStrategy.NEVER)
    private String userName;

    @ApiModelProperty("用户密码(首位拼盐MD5加密)")
    @TableField(value = "user_pass", updateStrategy = FieldStrategy.NOT_NULL)
    private String userPass;

    @ApiModelProperty("用户状态(0:初始状态,1:正常状态(首次修改密码后生效),2:注销,3:禁用)")
    @TableField(value = "user_status",updateStrategy = FieldStrategy.NOT_NULL, insertStrategy = FieldStrategy.DEFAULT)
    private Integer userStatus;
}
